package art.client.views;

import java.util.ArrayList;
import java.util.List;

import art.client.ClientFactory;
import art.client.widgets.UserTable;
import art.shared.entities.LoginInfo;
import art.shared.entities.UserShared;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.VerticalPanel;

public class UsersListView extends Composite implements IsWidget {
	VerticalPanel panel = new VerticalPanel();
	UserTable table = null;
	
	public UsersListView(final ClientFactory factory, LoginInfo loginInfo) {
		panel.add(factory.getMenuView(loginInfo));
		table = new UserTable(new ArrayList<UserShared>());
		panel.add(table);
		initWidget(panel);
	}

	public void updateTable(List<UserShared> users) {
		table.updateData(users);
	}
	
}
